package com.sphd.Restaurant.model;



import com.sphd.Restaurant.base.MyApplication;
import com.sphd.Restaurant.interfFace.VolleyCallBack;
import com.sphd.Restaurant.utils.VolleyUtil;

import java.util.Map;

/**
 * Created by Hu on 2016/9/28.
 */

public class BaseModel {
    public VolleyUtil volleyUtil = MyApplication.getVolleyUtil();

    public void sendStringUrl(String url, VolleyCallBack volleyCallBack) {
        volleyUtil.setStringRequest(url, volleyCallBack);
    }

    public void sendStringUrl(String url, VolleyCallBack volleyCallBack, Map<String, String> map) {
        volleyUtil.setStringRequest(url, volleyCallBack, map);
    }

    public void sendJsonObjectUrl(String url, VolleyCallBack volleyCallBack) {
        volleyUtil.setJsonObjectRequest(url, volleyCallBack);
    }

    public void sendJsonObjectUrl(String url, VolleyCallBack volleyCallBack, Map<String, String> map) {
        volleyUtil.setJsonObjectRequest(url, volleyCallBack, map);

    }

    public void sendJsonArrayUrl(String url, VolleyCallBack volleyCallBack) {
        volleyUtil.setJsonArrayRequest(url, volleyCallBack);
    }

    public void sendJsonArrayUrl(String url, VolleyCallBack volleyCallBack, Map<String, String> map) {
        volleyUtil.setJsonArrayRequest(url, volleyCallBack, map);
    }
}
